home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- ________________________
- \ \ \
- \ Tom \ \
- \ Donnelly \ \
- \ Computer \ \
- \ Software \ \
- \_____________________\_\
- \_____________________\_\
-
-
-
-
-
-
- Screen Saver
- Version 5.1
-
- Screen blanker and security software
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION
-
-
-
- Tom Donnelly
- Computer Software
- P.O. Box 3856
- San Dimas, CA
- 91773
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copyright (C) 1992-1993 Tom R. Donnelly All Rights Reserved
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION ...1
- ========================================================================
-
-
- This document describes the protocol required by a user application
- program to communicate with the resident copy of Screen Saver. Using
- this interface, it is possible to change various parameters of the
- resident program from within a user application.
-
- The information provided in this document is subject to change
- without notice.
-
- All communication between a user application and Screen Saver is
- performed through DOS Interrupt 54h. Using this interrupt, an
- application can interrogate whether Screen Saver is resident, which
- version is running and the segment address at which it was loaded.
- The application may also read and/or update the status byte, used to
- control certain Screen Saver options.
-
- Before issuing any calls to Screen Saver, you must insure that the
- vector for interrupt 54h is not zero. If it is zero, then Screen
- Saver is not resident. Issuing INT 54h when the vector is zero will
- send your computer into hyperspace, forcing a cold-boot.
-
- Mov AX,3554h ;Get interrupt vectors in ES:BX
- Int 21h ;Call DOS
- Or BX,BX ;Any offset?
- Jz Not_resident ;No - not resident
- Mov BX,ES ;Copy segment
- Or BX,BX ;Any segment?
- Jz Not_resident ;No - not resident
-
- After determining that the INT 54h vector points to something, the
- program is free to make function calls. All function calls require
- the function number in the AH register, the component code in AL
- register (Screen Saver's Activity Monitor component code is 03h, the
- Event Logger's component code is 18h) and the characters 'TD' in the
- CX register. Some functions, such as ReplaceStatusByte, require a
- new status byte in the BL register.
-
- If the function call was successful, CX will be returned containing
- zero (otherwise, CX will be non-zero). Byte parameters will usually
- be returned in the AL register. The GetLoadAddr function returns the
- segment address in the ES register.
-
- *** IMPORTANT ***
-
- Screen Saver is not the only program to use the INT 54h interface.
- It is important to check the success of the function call even when
- you find INT 54h to be non-zero. Screen Saver will only answer
- function calls containing the correct component code (03h for the
- Activity Monitor, 18h for the Event Logger) in AL. In addition,
- there may be function calls which are not supported on older versions
- of Screen Saver. Issuing an unsupported function call will return a
- non-zero value in the CX register.
-
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION - ACTIVITY MONITOR ...2
- ========================================================================
-
-
- Function 0 - GetVersion
- Entry: AH=0 Function code
- AL=03h Component code (always 3 for Activity Monitor)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Activity Monitor is resident.
- AL=version Format is Major*10 + Minor, eg: Version 4.9
- is returned as 49 (decimal) or 31h.
-
- ---------------------------------------------------------------------
-
- Function 3 - GetState
- Entry: AH=3 Function code
- AL=03h Component code (always 3 for Activity Monitor)
- CX='TD' Literal
-
- Exit: CX=0 If Activity Monitor is resident.
- AL=1 If Activity Monitor is ON or ON with LOCK.
- AL=0 If Activity Monitor is OFF.
-
- ---------------------------------------------------------------------
-
- Function 4 - Disable (deactivate Screen Saver Activity Monitor)
- Entry: AH=4 Function code
- AL=03h Component code (always 3 for Activity Monitor)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Activity Monitor is resident.
-
- ---------------------------------------------------------------------
-
- Function 5 - Enable (reactivate Screen Saver Activity Monitor)
- Entry: AH=5 Function code
- AL=03h Component code (always 3 for Activity Monitor)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Activity Monitor is resident.
-
- ---------------------------------------------------------------------
-
- Function 7 - GetLoadAddr
- Entry: AH=7 Function code
- AL=03h Component code (always 3 for Activity Monitor)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Activity Monitor is resident.
- ES= Segment address of resident code.
-
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION - ACTIVITY MONITOR ...3
- ========================================================================
-
-
-
- Function 8 - GetStatusByte
- Entry: AH=8 Function code
- AL=03h Component code (always 3 for Activity Monitor)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Activity Monitor is resident.
- AL=76543210 Status byte from resident code.
- Bit 7: 1=EGA supported (do not change)
- Bit 6: 1=VGA supported (do not change)
- Bit 5: 1=MCGA supported (do not change)
- Bit 4: 1=Hercules supported (do not change)
- Bit 3: 1=Invoke keyboard lock
- Bit 2: 1=Invoke screen blanker
- Bit 1: 1=Lock-mode active (LOCK or LOCKONLY)
- Bit 0: 1=Blanker active (ON or LOCK mode)
-
- ---------------------------------------------------------------------
-
- Function 9 - ReplaceStatusByte
- Entry: AH=9 Function code
- AL=03h Component code (always 3 for Activity Monitor)
- BL=byte new status byte (See Function 8 for details)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Activity Monitor is resident.
-
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION - ACTIVITY MONITOR ...4
- ========================================================================
-
-
- Example: Activate security lock from an application program.
-
- This code fragment performs the following:
- 1. Insures that vectors for INT 54h is not zero.
- 2. Requests the resident version to make sure that
- Screen Saver is resident and that it is at least
- version 5.1.
- 3. Requests the resident status byte.
- 4. Turns on the lock-request bit in the status byte.
- 5. Replaces the status byte in the resident code.
-
-
- Mov AX,3554h ;Get interrupt vectors in ES:BX
- Int 21h ;Call DOS
- Or BX,BX ;Any offset?
- Jz NotResident ;No - not resident
- Mov BX,ES ;Copy segment
- Or BX,BX ;Any segment?
- Jz NotResident ;No - not resident
-
- Mov AH,0 ;GetVersion function code
- Mov AL,3 ;Component code
- Mov CX,'TD' ;Literal
- Int 54h
- Jcxz GotVersion ;Got it ok
- Jmp NotResident
- GotVersion:
- Cmp AL,51 ;Version 5.1 or greater?
- Jb BadVersion ;No - skip the rest
-
- Mov AH,8 ;GetStatusByte function code
- Mov AL,3 ;Component code
- Mov CX,'TD' ;Literal
- Int 54h
- Jcxz GotStatus ;Got it ok
- <Handle error here>
- GotStatus:
- Or AL,00001010b ;Insure lock mode and activate lock
-
- Mov BL,AL ;copy to BL for Replace function
- Mov AH,9 ;ReplaceStatusByte function code
- Mov AL,3 ;Component code
- Mov CX,'TD' ;Literal
- Int 54h
- Jcxz AllDone
- <Handle error here>
- AllDone:
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION - EVENT LOGGER ...5
- ========================================================================
-
-
- Function 0 - GetVersion
- Entry: AH=0 Function code
- AL=18h Component code (always 18h for Event Logger)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Event Logger is resident.
- AL=version Format is Major*10 + Minor, eg: Version 4.9
- is returned as 49 (decimal) or 31h.
-
- ---------------------------------------------------------------------
-
- Function 2 - ReplaceParm
- Entry: AH=2 Function code
- AL=18h Component code (always 18h for Event Logger)
- CX='TD' Literal
- BX=code Event code to be logged
- 0000h=Keyboard unlocked
- 0001h=Invalid Password
- 0002h=Lock-engaged
- 0003h=Midnight
- 0004h=SCSAVER loaded
- 0005h=SCSAVER removed
- 0006h=SCSAVER updated resident parameters
- 0007h=New password set
- 0008h=Clear counters
- 0009h=Enable logging
- 000Ah-
- 007Fh=Reserved
- 0080h-
- 00FFh=User log events
-
- Exit: CX=0 If Event Logger is resident.
- AL=1 If Event Logger is logging events.
- AL=0 If Event Logger is deferring events.
-
- ---------------------------------------------------------------------
-
- Function 3 - GetState
- Entry: AH=3 Function code
- AL=18h Component code (always 18h for Event Logger)
- CX='TD' Literal
-
- Exit: CX=0 If Event Logger is resident.
- AL=1 If Event Logger is logging events.
- AL=0 If Event Logger is deferring events.
-
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION - EVENT LOGGER ...6
- ========================================================================
-
-
-
- Function 4 - Disable (defer Screen Saver Event Logger)
- Entry: AH=4 Function code
- AL=18h Component code (always 18h for Event Logger)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Event Logger is resident.
-
- ---------------------------------------------------------------------
-
- Function 5 - Enable (reactivate Screen Saver Event Logger)
- Entry: AH=5 Function code
- AL=18h Component code (always 18h for Event Logger)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Event Logger is resident.
-
- ---------------------------------------------------------------------
-
- Function 7 - GetLoadAddr
- Entry: AH=7 Function code
- AL=18h Component code (always 18h for Event Logger)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Event Logger is resident.
- ES= Segment address of resident code.
-
- ---------------------------------------------------------------------
-
- Function 8 - GetStatusByte
- Entry: AH=8 Function code
- AL=18h Component code (always 18h for Event Logger)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Event Logger is resident.
- AL=76543210 Status byte from resident code.
- Bit 7-1: Reserved
- Bit 0: 1=Event logging active
-
- ---------------------------------------------------------------------
-
- Function 9 - ReplaceStatusByte
- Entry: AH=9 Function code
- AL=18h Component code (always 18h for Event Logger)
- BL=byte new status byte (See Function 8 for details)
- CX='TD' Literal
-
- Exit: CX=0 If Screen Saver Event Logger is resident.
-
-
- APPLICATION PROGRAMMING INTERFACE DESCRIPTION - EVENT LOGGER ...7
- ========================================================================
-
-
- Example: Clear Event Logger counters from an application program.
-
- This code fragment performs the following:
- 1. Insures that vectors for INT 54h is not zero.
- 2. Requests the resident version to make sure that
- Screen Saver is resident and that it is at least
- version 5.1.
- 3. Issue the Clear Counter request.
-
-
- Mov AX,3554h ;Get interrupt vectors in ES:BX
- Int 21h ;Call DOS
- Or BX,BX ;Any offset?
- Jz NotResident ;No - not resident
- Mov BX,ES ;Copy segment
- Or BX,BX ;Any segment?
- Jz NotResident ;No - not resident
-
- Mov AH,0 ;GetVersion function code
- Mov AL,18h ;Component code
- Mov CX,'TD' ;Literal
- Int 54h
- Jcxz GotVersion ;Got it ok
- Jmp NotResident
- GotVersion:
- Cmp AL,51 ;Version 5.1 or greater?
- Jb BadVersion ;No - skip the rest
-
- Mov AH,2 ;ReplaceParm function code
- Mov AL,18h ;Component code
- Mov CX,'TD' ;Literal
- Mov BX,8 ;Clear counters
- Int 54h
- Jcxz AllDone
- <Handle error here>
- AllDone:
-